package org.spring.stream;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.messaging.Message;
import org.springframework.messaging.support.MessageBuilder;
import org.springframework.stereotype.Service;

@Service
public class TestServiceImpl implements TestService{

	@Autowired
    private Barista barista;

	
	@Override
	public void savetest(Test test) {
		Message<Test> fffff = MessageBuilder.withPayload(test).build();
		barista.hotDrinks().send(fffff);
        System.out.println("发送消息send1");
	}

}
